<?php

class Collection extends MY_Controller {
    public function __construct() {
        parent::__construct();
        $this->load->model('collection_model');
    }

    protected function _get_nav() {
        return array(
            'collection/view' => array(
                'href'  => 'collection/view',
                'value' => 'View collection',
                'class' => 'icon-film'
            ),
            'collection/add' => array(
                'href'  => 'collection/add',
                'value' => 'Add title',
                'class' => 'icon-plus-sign'
            )
        );
    }

    public function index() {
        $this->view();
    }

    public function view() {
        $data['list'] = $this->collection_model->get_list();
        $this->_set_active_view('collection/view');
        $this->_render('View Collection', 'collection/view', $data);
    }
}
?>
